<%@ page language="java" contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<div class="page-content">
	<!--content-->
	<div class="panel panel-default oparePanel">
		<div class="panel-body">
			<div class="opare">
				<input type="button"  value="+" class="btn_add" onclick="menuFullUrl('role/add/view');"/>
				<input type="button"  value="删 除" class="btn" onclick="role.delBatch();"/>
			</div>

		</div>
	</div>

	<div class="portlet-body">
		<div class="table-scrollable">
			<table class="table table-condensed flip-content">
				<thead class="flip-content">
					<tr>
						<th style="width: 20px;"><input type="checkbox" id="all" name="all" onclick="checkAll('id');"/></th>
						<th width="20%">角色名称</th>
						<th width="20%">描述</th>
						<th width="10%">状态</th>
						<th width="20%">创建时间</th>
						<th width="30%" class="text-center">操作</th>
					</tr>
				</thead>
				<tbody id="select_tbody">
				
				
				 <c:if test="${result.code eq 'SUCCESS' }">
					     <c:forEach items="${result.data.rows}" var ="row" varStatus="status">
						     <tr>
						<td style="width: 20px;" class=""><input type="checkbox" name="id" id="id" value="${row.id }" /></td>
						<td width="20%" class="">${row.name }</td>
						<td width="20%" class="">${row.note }</td>
						
								<c:choose>  
								   <c:when test="${row.status eq '0'}"> 
								     <td width="10%" class="">待审批</td>
								   </c:when>  
								   <c:when test="${row.status eq '1'}"> 
								     <td width="10%" class="">正常</td>
								   </c:when>  
								   <c:when test="${row.status eq '2'}"> 
								     <td width="10%" class="">注销</td>
								   </c:when>  
								</c:choose>  
						<td width="20%" class=""><fmt:formatDate value="${row.createTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
						<td width="30%" class="text-center">
									
								 
								 <c:choose>
								   <c:when test="${row.isDelete eq 0 }">  
								   <a href="javascript:;" onclick="role.dele('${row.id}');" class="a-delet ">删除</a>
								   </c:when>
								   <c:otherwise> 
								   <a href="javascript:;"  class="a-delet disabled" >删除</a>
								   </c:otherwise>
								</c:choose>
									
								<c:choose>  
									<c:when test="${row.status eq '1'}"> 
									<a href="javascript:;" onclick="updateShow('role/view', 'role:modify','${row.id}');" class="a-modefiy">修改</a>
								   
								   </c:when> 
								   <c:otherwise> 
									    <a href="javascript:;"  class="a-delet disabled">修改</a>
									</c:otherwise>
								</c:choose> 
									<a href="javascript:;" onclick="detailShow('role/view', 'role:detail','${row.id}');" class="a-detial">详情</a>
								</td>
					</tr>
					   </c:forEach>
					   </c:if>
					

				</tbody>
			</table>
		</div>
	</div>

	<!--end content-->
	<div class="clearfix"></div>
</div>

<c:if test="${result.code eq 'SUCCESS' }">
  
  <script type="text/javascript">

    Page.navigation('page', 'role/view', 'role:page', '${result.data.pageSize}', '${result.data.total}', '${result.data.pageCount}', '${result.data.currPage}', 'menuUrl');

  </script>
  
  <div id="page" class="page"> </div>

</c:if>

<div class="clearfix"></div>
